package com.yuanchu.auth.service.impl;

import com.yuanchu.auth.dto.AuthParamsDto;
import com.yuanchu.auth.dto.ShopUserExtend;
import com.yuanchu.auth.service.AuthService;
import org.springframework.stereotype.Service;

/**
 * @version: 1.0
 * @Author: adan
 * @description:
 * @date: 2024-01-28 18:21
 */
@Service("wxchat_authService")
public class WxchatAuthServiceImpl  implements AuthService {

    @Override
    public ShopUserExtend execute(AuthParamsDto authParamsDto) {
        String username = authParamsDto.getUsername();
        String userid = authParamsDto.getUserid();
        // 直接生成token
        ShopUserExtend userExtend = new ShopUserExtend();
        userExtend.setStoreUserId(Integer.valueOf(userid));
        userExtend.setUserName(username);
        // 设置默认密码
        userExtend.setPassword("wxchat");
        return userExtend;
    }
}
